<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>许愿墙</title>
		<!--<script src="./Public/Home/bootstrap/js/bootstrap.min.js"></script>-->
		<link href="./Public/Home/bootstrap/css/bootstrap.min.css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="./Public/Home/css/animate.css"/>
		<link rel="stylesheet" type="text/css" href="./Public/Home/css/style.css"/>
		<script type="text/javascript" src="./Public/Home/js/jquery-1.8.0.min.js"></script>
		<script type="text/javascript" src="./Public/Home/js/js.js"></script>
	</head>
	<body>
		<div id="bg">
			<img src='Public/Home/img/dandelion.jpg'/>
			<?php if(isset($_SESSION['uname'])): ?>	
			<!--点击大蒲公英图片遮罩-->
			<div id="map" style="display:block"></div>
			<?php else: ?>
			<div id="map" style="display:none"></div>
			<?php endif ?>
			<!--点击七星瓢虫-->
			<div id="login"></div>
			<!--许愿表单-->
			
			<form action="javascript:;" method="post" id="xuyuan">
				<div id='form-style1'>
					<dl>
						<dt class="text-center">许愿标题:</dt>
						<dd>
							<input style="width:365px;" type="text" name="title" placeholder="输入您的许愿标题....">	
						</dd>
					</dl>
					<dl>
						<dt class="text-center">许愿语:</dt>
						<dd>
							<textarea name="content" id="con" placeholder="输入您想说的话...."></textarea>
						</dd>
					</dl>
					<dl>
						<dt></dt>
						<dd class="text-center" >
							<input class='btn' type="submit" value="提交">
						</dd>
					</dl>
				</div>
			</form>	

		<?php if(!isset($_SESSION['uname'])): ?>	
			<!--登录遮罩-->
			<div class="deng"></div>
			<!--登录表单-->
			<form action="javascript:;" method="post" id="denglu">
					<div class="form-group">
					    <label for="exampleInputEmail1">User</label>
					    <input type="text" class="form-control" id="exampleInputEmail1" placeholder="User" name="user">
					  </div>
					<div class="form-group">
					    <label for="exampleInputPassword1">Password</label>
					    <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password" name="pwd">
					</div>
					<input type='submit' value="登录"  class="btn btn-default text login" style="margin: 0 35px;"/>
					<a class="btn btn-default text go" style="margin: 0 auto;" href="javascript:;">没有用户</a>
			</form>
			<!--注册表单-->
			<form action="javascript:;" method="post" id="zhuce">
					<div class="form-group">
					    <label for="exampleInputEmail1">User</label>
					    <input type="text" class="form-control" id="exampleInputEmail1" placeholder="User" name="user1">
					  </div>
					<div class="form-group">
					    <label for="exampleInputPassword1">Password</label>
					    <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password" name="pwd1">
					</div>
					<input type='submit' value="注册" class="btn btn-default text login" style="margin: 0 35px;"/>
					<a class="btn btn-default text go" style="margin: 0 auto;" href="javascript:;">已有用户</a>
			</form>
			<?php else: ?>		
				<h3 style="position: absolute;top: 0px;left: 0px;">欢迎 <?php echo $_SESSION['uname'] ?> 回来 <a href="./index.php?a=out">退出</a></h3>
			<?php endif ?>
			<!--添加蒲公英-->
			<?php foreach($data as $k=>$v): ?>
				<div class="piece" style="left:<?php echo $v['l']?>px;top: <?php echo $v['t']?>px;">
					<img src="./Public/Home/img/u1.png" alt="" />
					<div class="column">
					    <a href="javascript:;" key=<?php echo $k ?> >
					      <img src="Public/Home/img/close.gif" alt="" ></a>
					    <div class="idress">字条编号：<?php echo $k+1 ?></div> 
				    	<h4 class="title"><?php echo $v['title'] ?></h4>			    
					    <p class="content"><?php echo $v['content'] ?></p>			    
					    <p class="name"><?php echo $v['user'] ?></p>
					    <p class="date"><?php echo $v['time'] ?></p>
			  		</div>
				</div>
		 	<?php endforeach ?>
		</div>
		
	</body>
</html>
